1. Field of the Invention
The present invention relates to a fast semaphore register having secured operation without any specific bus protocol.
In multi-processor systems, it often happens that several processors simultaneously request access to a common resource (such as a screen, printer, etc.). In certain cases, these resources may be accessible simultaneously by several processors. This is the case, for example, with certain memories. In other cases, the resources can be used only by one processor at a time. They are then called non-shareable resources. It is possible to use a "semaphore" which is a memory cell designed to be used by a software program so that, during a certain period of time, a task performed on one or more processors can be sure of having exclusive access to a non-shareable resource of the system. This semaphore function conventionally requires the use of special measures: within processors, this entails the definition and use of particular indivisible or atomic read and write instructions (for example "test and set", "compare and swap", "load and reserve"). On the buses of the processors and the associated sub-buses (in the memories, the input/output circuits and the intercommunication buses), it is necessary to use particular signals (for example "lock" or "RMW", namely "read, modify, write") or particular bus protocols designed to extend the indivisible character of the cycles outside the processors. These specific bus protocols and these particular signal systems very often have the drawback of introducing complexity and time losses into the bus management systems, for example into the arbitration of the bus.
2. Description of the Prior Art
For example, according to the U.S. Pat. No. 5,276,886, there is a known semaphore device for a multi-processor system working in a read mode without any particular bus protocol or specific processor instruction. This device cannot give the number of the task that has switched it over to the "busy" state. This is because of an internal command for the switching over of the state of the semaphore and because it is impossible to take account of action related to the reading of the semaphore.
According to the U.S. Pat. No. 5,317,749, there is a known method for controlling access to a shared resource. This is a purely software method and requires a specific bus protocol.